﻿Public Class frmTraCuuLopHoc

    Private Sub frmTraCuuLopHoc_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cboKhoi.DataSource = KhoiBUS.SelectAll()
        cboKhoi.ValueMember = "MAKHOI"
        cboKhoi.DisplayMember = "TENKHOI"
    End Sub

    Private Sub btnTraCuu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTraCuu.Click
        Dim maKhoi As Integer = cboKhoi.SelectedValue
        dgvDSLop.Rows.Clear()
        For Each l As LopDTO In LopBUS.SelectByMaKhoi(maKhoi)
            dgvDSLop.Rows.Add(l.MALOP, l.TENLOP, l.SISO, l.KHOI, l.NAM, l.MAKHOI)
        Next
    End Sub
End Class